home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 March
/
CMCD0305.ISO
/
Software
/
Shareware
/
Utilitare
/
emu
/
Emu8086_Setup_307c.exe
/
{app}
/
Samples
/
PrinterDemo.asm
< prev
next >
Wrap
Assembly Source File
|
2003-06-02
|
767b
|
38 lines
; PrinterDemo.asm - Andrew Nelis 2003
;
; Simple demonstration of the printer.
;
; it is required to start "Printer.exe"
; before running this demonstration
; (select it from "Virtual Devices" menu
; of the emulator).
#make_COM#
; COM file is loaded at CS:0100h
ORG 100h
lea bx, message
mov cx, 27d ; Length of message
mov ax, 0h ; Ensure top and bottom of
; ax empty
spit:
mov al, [bx] ; Put char into al
out 130d, al ; push char out port
; (ie. into printer)
inc bx ; inc pointer
wait: ; Loop to ensure the printer
in al, 130d ; is ready, it clears
or al, 0 ; the port when this is true.
jnz wait
loop spit ; Go back and repeat if we're
; not finished
ret
message db "Hello World!", 10, 13, "------------", 07